using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.ArrivalInspection
{
    /// <summary>
    /// 到货检验明细
    /// </summary>
    [Table("ArrivalInspectionItem")]
    public class ArrivalInspectionItem
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 外键：到货检验单ID
        /// </summary>
        public long InspectionId { get; set; }

        /// <summary>
        /// 采购单号（冗余，便于追溯）
        /// </summary>
        public string PurchaseOrderNo { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string SpecModel { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 品牌
        /// </summary>
        public string Brand { get; set; }

        /// <summary>
        /// 采购数量
        /// </summary>
        public decimal PurchaseQty { get; set; }

        /// <summary>
        /// 收货数量
        /// </summary>
        public decimal ReceivedQty { get; set; }

        /// <summary>
        /// 检验类型（全检/抽检/免检）
        /// </summary>
        public string InspectionType { get; set; }

        /// <summary>
        /// 检验数量
        /// </summary>
        public decimal InspectQty { get; set; }

        /// <summary>
        /// 合格数量
        /// </summary>
        public decimal QualifiedQty { get; set; }

        /// <summary>
        /// 不合格数量
        /// </summary>
        public decimal UnqualifiedQty { get; set; }

        /// <summary>
        /// 检验结论（合格/不合格/免检）
        /// </summary>
        public string InspectResult { get; set; }

        /// <summary>
        /// 不合格原因/说明
        /// </summary>
        public string UnqualifiedReason { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }
}
